.row
  .col-md-8
    .card
      .card-header
        h3.card-title 应用信息
        .card-tools
          button.btn.btn-tool data-card-widget="collapse"
            i.fas.fa-minus
      .card-body
        dl.system-info
          dt 名称
          dd
            pre = @app_info.name
          dt 版本
          dd
            pre = "#{@app_info.release_version} (#{@app_info.build_version})"
          dt Bundle Id
          dd
            pre = @app_info.bundle_id
          dt 打包类型
          dd
            pre = @app_info.release_type
          dt 支持设备
          dd
            pre = @app_info.device_type
          dt 最低 iOS 版本
          dd
            pre = @app_info.min_sdk_version
          dt 文件大小
          dd
            pre = number_to_human_size(@app_info.size)

    - if @app_info.mobileprovision?
      .card
        .card-header
          h3.card-title 描述文件
          .card-tools
            button.btn.btn-tool data-card-widget="collapse"
              i.fas.fa-minus
        .card-body
          dl.system-info
            dt 名称 (类型)
            dd
              pre = "#{@app_info.profile_name} (#{@app_info.release_type})"
            dt UUID
            dd
              pre = @app_info.mobileprovision.UUID
            dt 团队名称 (Team ID)
            dd
              pre = "#{@app_info.team_name} (#{@app_info.team_identifier.first})"
            dt 创建时间
            dd
              pre = @app_info.mobileprovision.created_date
            dt 过期时间
            dd
              pre
                = "#{@app_info.expired_date} ("
                span.text-green.text-bold
                  = "还有#{distance_of_time_in_words(Time.current, @app_info.expired_date)}过期"
                | )

      - if @app_info.mobileprovision.developer_certs.present?
        .card
          .card-header
            h3.card-title
              | 开发者证书 (
              = @app_info.mobileprovision.developer_certs.size
              | )
            .card-tools
              button.btn.btn-tool data-card-widget="collapse"
                i.fas.fa-minus
          .card-body
            dl.system-info
              - @app_info.mobileprovision.developer_certs.each_with_index do |cert, i|
                dt
                  | 证书
                  = i + 1
                dd
                  pre = cert.name
                dt 创建时间
                dd
                  pre = cert.created_date
                dt 过期时间
                dd
                  pre = cert.expired_date

    - if @app_info.release_type == AppInfo::IPA::ExportType::ADHOC
      .card
        .card-header
          h3.card-title
            | 设备列表 (
            = @app_info.devices.size
            | )
          .card-tools
            button.btn.btn-tool data-card-widget="collapse"
              i.fas.fa-minus
        .card-body.p-0
          table.table
            - @app_info.devices.each do |udid|
              tr
                td
                  span = udid
                  - if (device = Device.find_by(udid: udid)) && device.name.present?
                    .float-right
                      small.badge.badge-light
                        = device.name

    - if @app_info.mobileprovision.Entitlements
      .card
        .card-header
          h3.card-title Entitlements
          .card-tools
            button.btn.btn-tool data-card-widget="collapse"
              i.fas.fa-minus
        .card-body
          dl.system-info
            - @app_info.mobileprovision.entitlements.sort.each do |name, value|
              dt = name
              dd
                pre = value

  .col-md-4
    .card
      .card-header
        h3.card-title 已启用功能
        .card-tools
          button.btn.btn-tool data-card-widget="collapse"
            i.fas.fa-minus
      .card-body
        table.table.table-striped
          - @app_info.mobileprovision.enabled_capabilities.each do |key|
            tr
              td = key

    - if @app_info.info['CFBundleURLTypes'].present?
      .card
        .card-header
          h3.card-title URL Schemes
          .card-tools
            button.btn.btn-tool data-card-widget="collapse"
              i.fas.fa-minus
        .card-body
          table.table.table-striped
            - @app_info.info['CFBundleURLTypes'].each do |type|
              tr
                td = type['CFBundleURLSchemes'].join(', ')
